package com.poh.Utils;

import java.util.ArrayList;
import java.util.List;

public class judgeQuestion {
    public static Double judgeAllQuestion(String str1, String str2, double scoreValue) {
        List s1 = new ArrayList();
        List s2 = new ArrayList();
        int rightCount = 0;
        for(String s : str1.split(",")){
            s1.add(s);
        }
        for(String s : str2.split(",")){
            s2.add(s);
        }
        for (int i = 0; i < s1.size(); i++) {
            String i1 = (String) s1.get(i);
            String i2 = (String) s2.get(i);
            if (i1.equals(i2)) {
                rightCount++;
            }
        }
        return rightCount*scoreValue;
    }
}
